<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>let</title>
</head>
<body>
<script !src="">
    "use strict";
   /* for (var i = 0; i < 100; i++) {
        console.log(i);
    }
    var 会出现作用域问题，此时需要改用let
    console.log(i+1);
    */

   for (let i = 0; i < 100; i++) {
       console.log(i);
   }
   // console.log(i + 1); //会报错，i未定义
</script>
</body>
</html>